package xin.nick.fallback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import xin.nick.api.LandOrderApi;

@Slf4j
@Component
public class LandOrderApiFallBack implements FallbackFactory<LandOrderApi> {
    @Override
    public LandOrderApi create(Throwable cause) {

        log.error("日志服务调用失败:{}", cause.getMessage());


        return new LandOrderApi() {
            @Override
            public String getOrderInfo() {
                return "没有肉啊";
            }
        };
    }
}
